home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
archiver
/
ncmp424b.zoo
/
zcmp
(
.txt
)
< prev
next >
Wrap
Microsoft Windows Help File Content
|
1993-03-06
|
772b
|
38 lines
#!/bin/sh
OPTIONS=
FILES=
for ARG
case "$ARG" in
-*) OPTIONS="$OPTIONS $ARG";;
*) FILES="$FILES $ARG";;
esac
if test -z "$FILES"; then
echo "Usage: zcmp [cmp_options] file [file]"
exit 1
set $FILES
if test $# -eq 1; then
FILE=`expr $1 : '\(.*\)\.Z' '|' $1`
zcat $FILE | cmp $OPTIONS - $FILE
STAT="$?"
elif test $# -eq 2; then
case "$1" in
*.Z) case "$2" in
*.Z) F=`basename $2 .Z`
zcat $2 > /tmp/$F.$$
zcat $1 | cmp $OPTIONS - /tmp/$F.$$
STAT="$?";;
*) zcat $1 | cmp $OPTIONS - $2;;
esac;;
*) case "$2" in
*.Z) F=`basename $2 .Z`
zcat $2 > /tmp/$F.$$
cmp $OPTIONS $1 /tmp/$F.$$
STAT="$?";;
*) cmp $OPTIONS $1 $2
STAT="$?";;
esac;;
esac
exit "$STAT"
echo "Usage: zcmp [cmp_options] file [file]"
exit 1